<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div style="width: 800px;height: 800px;box-shadow: 0 0 10px #000;">
    <canvas id="myCanvas"></canvas>
  </div>
</body>

</html>

<script>
  const canvas = document.getElementById('myCanvas')
  const c = canvas.getContext('2d')

  c.fillRect(20, 20, 100, 100)
  c.clearRect(40, 40, 60, 60)
  c.strokeRect(45, 45, 50, 50)
</script>